import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'sunmi_nfc_manager_method_channel.dart';

abstract class SunmiNfcManagerPlatform extends PlatformInterface {
  /// Constructs a SunmiNfcManagerPlatform.
  SunmiNfcManagerPlatform() : super(token: _token);

  static final Object _token = Object();

  static SunmiNfcManagerPlatform _instance = MethodChannelSunmiNfcManager();

  /// The default instance of [SunmiNfcManagerPlatform] to use.
  ///
  /// Defaults to [MethodChannelSunmiNfcManager].
  static SunmiNfcManagerPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [SunmiNfcManagerPlatform] when
  /// they register themselves.
  static set instance(SunmiNfcManagerPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  /// 初始化NFC管理器
  Future<bool> initialize() {
    throw UnimplementedError('initialize() has not been implemented.');
  }

  /// 切换指定的NFC模块
  Future<bool> switchNfc(String sn) {
    throw UnimplementedError('switchNfc() has not been implemented.');
  }

  /// 设置当前NFC模块的水印透明度
  Future<bool> setNfcWaterMarkAlpha(int alpha) {
    throw UnimplementedError('setNfcWaterMarkAlpha() has not been implemented.');
  }

  /// 结束注册的NFC模块监听器
  Future<bool> unregisterNfcListener() {
    throw UnimplementedError('unregisterNfcListener() has not been implemented.');
  }

  /// 销毁NFC管理器
  Future<bool> destroy() {
    throw UnimplementedError('destroy() has not been implemented.');
  }

  /// 获取当前NFC列表
  Future<List<Map<dynamic, dynamic>>> getCurrentNfcList() {
    throw UnimplementedError('getCurrentNfcList() has not been implemented.');
  }
}
